﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RANBMainPage.aspx.cs" Inherits="SWENAssignment.Sophia.RANBMainPage1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }

        .auto-style2 {
            width: 950px;
            height: 280px;
        }

        .auto-style3 {
            height: 23px;
        }
        .auto-style4 {
            height: 25px;
        }
    </style>
</head>
<body style="background-color: #CCFFCC">
    <form id="form1" runat="server">
        <div>

            <table class="auto-style1">
                <tr>
                    <td colspan="4">
                        <img alt="banner" class="auto-style2" src="../Images/jjw-dona-filipa-hotel-home-banner-01.jpg" /></td>
                </tr>
                <tr>
                    <td colspan="4" class="auto-style3"><strong>WELCOME TO ROOM BOOKING MODULE!</strong></td>
                </tr>
                <tr>
                    <td class="auto-style4">&nbsp;&nbsp;&nbsp; </td>
                    <td class="auto-style4"></td>
                    <td class="auto-style4"></td>
                    <td class="auto-style4"></td>
                </tr>
                <tr>
                    <td>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Homepage.aspx">Homepage</asp:HyperLink>
                    </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnRetrieve" runat="server" OnClick="Button1_Click" Text="Retrieve All Customer Details" />
                    </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    </tr>
            <tr>
                <td class="auto-style3"></td>
                <td class="auto-style3"></td>
                <td class="auto-style3"></td>
                <td class="auto-style3"></td>
            </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Width="414px" DataKeyNames="roomNum">
                                <Columns>
                                    <asp:TemplateField HeaderText="Room Number">
                                        <ItemTemplate>
                                            <asp:LinkButton runat="server" ID="roomNumber" OnClick="lbtnroomNum_Click" CommandArgument='<%# Eval("roomNum") + "/" + Eval("reservationID") %>'><%# Eval("roomNum")%></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="roomStatus" HeaderText="Room Status" SortExpression="roomStatus" />

                                    
                                </Columns>
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelManagementConnectionString %>" SelectCommand="SELECT [roomNum], [roomStatus], [reservationID] FROM [rooms]"></asp:SqlDataSource>
                        </td>
                </tr>
            </table>

        </div>
    </form>
</body>
</html>
